﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RetrievePassword.aspx.cs"
    Inherits="SGDemo.Web.RetrievePassword" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>取回密码 - 辉煌装修信息管理系统</title>
    <link href="Styles/Common/RetrievePassword.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        //下一步
        var doNext = function () {
            var userName = $('#txtUserName').val();
            if (!userName) {
                $('#lblTipsA').text('提示：用户名不能为空！');
                $('#txtUserName').focus();
                return;
            }

            var code = $('#txtCode').val();
            if (!code) {
                $('#lblTipsA').text('提示：验证码不能为空！');
                $('#txtCode').focus();
                return;
            }
            var arg = "UserName=" + userName + "&Code=" + code + "&Step=1";
            cbpRetrievePasswordPanel.PerformCallback(arg);
        }

        //密保验证
        var doComplete = function () {
            var passwordAnswer = $('#txtPasswordAnswer').val();
            if (!passwordAnswer) {
                $('#lblTipsB').text('提示：密保答案不能为空！');
                $('#txtPasswordAnswer').focus();
                return;
            }
            var arg = "PasswordAnswer=" + passwordAnswer + "&Step=2";
            cbpRetrievePasswordPanel.PerformCallback(arg);
        }
        
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="ui-wrapper">
        <div class="ui-header">
        </div>
        <div class="ui-content">
            <div class="ui-content-header">
                找回密码
            </div>
            <div class="ui-content-body">
                <dx:ASPxCallbackPanel ID="cbpRetrievePasswordPanel" runat="server" OnCallback="cbpRetrievePasswordPanel_Callback" LoadingPanelText="加载中...">
                    <PanelCollection>
                        <dx:PanelContent runat="server">
                            <asp:Panel ID="pnlFirst" runat="server" Visible="true">
                                <div class="ui-content-body-title">
                                    请填写用户名
                                </div>
                                <table cellpadding="0" cellspacing="0" border="0" class="ui-content-body-layout">
                                    <tr>
                                        <td class="oddCol">
                                            <span class="red">* </span>用户名：
                                        </td>
                                        <td class="evenCol">
                                            <input id="txtUserName" name="txtUserName" type="text" class="txt" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="oddCol">
                                            <span class="red">* </span>验证码：
                                        </td>
                                        <td class="evenCol">
                                            <input id="txtCode" name="txtCode" type="text" class="txt" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td class="evenCol">
                                            <table cellpadding="0" cellspacing="0" border="0" class="ui-Captcha-layout">
                                                <tr>
                                                    <td colspan="2">
                                                        请输入图中字符，不区分大小写
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <dx:ASPxCaptcha ID="capCode" ClientInstanceName="capCode" runat="server" Width="80"
                                                            Height="40" CodeLength="4">
                                                            <ValidationSettings ErrorDisplayMode="Text" />
                                                            <ChallengeImage Width="100" Height="40" FontFamily="Tahoma" BackgroundColor="Transparent"
                                                                ForegroundColor="#333300" BorderWidth="1" BorderColor="#A8AAB4" BackgroundImage-ImageUrl="Styles/themes/conmon/vcode.png">
                                                            </ChallengeImage>
                                                            <ValidationSettings EnableValidation="False">
                                                            </ValidationSettings>
                                                            <TextBox Visible="False" />
                                                            <RefreshButton Visible="False">
                                                            </RefreshButton>
                                                            <LoadingPanel Enabled="False" />
                                                            <ClientSideEvents />
                                                        </dx:ASPxCaptcha>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" style="padding-top:5px;">
                                                        <a href="javascript:capCode.Refresh();">看不清楚，换一张</a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="tips">
                                                <asp:Label ID="lblTipsA"  ClientIDMode="Static" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <input type="button" class="btn" value="下一步" onclick="doNext()" />
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                            <asp:Panel ID="pnlSecond" runat="server" Visible="false">
                                <div class="ui-content-body-title">
                                    请填写密保答案
                                </div>
                                <table cellpadding="0" cellspacing="0" border="0" class="ui-content-body-layout">
                                    <tr>
                                        <td class="oddCol">
                                            密保问题：
                                        </td>
                                        <td class="evenCol">
                                            <asp:Label ID="txtPasswordQuestion" runat="server" ></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="oddCol">
                                            密保答案：
                                        </td>
                                        <td class="evenCol">
                                            <input id="txtPasswordAnswer" type="password" class="txt" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" class="tips">
                                            <asp:Label ID="lblTipsB" ClientIDMode="Static" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <input type="button" class="btn" value="提 交" onclick="doComplete()" />
                                        </td>
                                    </tr>
                                </table>
                                <asp:HiddenField ID="hfUserName" runat="server" />
                            </asp:Panel>
                            <asp:Panel ID="pnlThird" runat="server" Visible="false">
                                <div class="ui-content-body-title">
                                    
                                </div>
                                <div class="ui-content-body-content">
                                    <p> <asp:Label ID="lblTipsC" runat="server"></asp:Label></p>
                                    <p><a href="Login.aspx">返回登录页面</a></p>
                                </div>
                            </asp:Panel>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxCallbackPanel>
            </div>
        </div>
        <div class="ui-footer">
            <p>
                Copyright © 2011 - 2012 SolutionGear Corporation, All Rights Reserved</p>
            <p>
                神冠软件 版权所有</p>
        </div>
    </div>
    </form>
</body>
</html>
